home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
CHASSIS_
/
MAINWIND.C
< prev
next >
Wrap
Text File
|
1992-05-14
|
1KB
|
59 lines
/************************************************************************************/
/* MainWindowProc */
/************************************************************************************/
#include "MyHeaders.h"
int MainWindowProc()
{
int MainWindRetCode = 0;
windSub = 0; /* point to window record */
SetPort (windTbl[windSub].windPtr); /* set as the grafPort */
workPoint = myEvent.where;
GlobalToLocal(&workPoint);
switch (myEvent.what) /* how did I get here? */
{
case (mouseDown): /* MouseDown? */
switch (myMouseWhere) /* What part of window? */
{
case (inContent): /* content region: */
break;
case (inDrag): /* drag region: */
DragWindow (windTbl[windSub].windPtr,
myEvent.where, &myDragRect);
break;
case (inGrow): /* grow region: */
break; /* do nothing */
case (inGoAway): /* goaway region: */
break; /* no goaway region */
}
break;
case(autoKey): /* beep for non command-key events */
case(keyDown):
SysBeep(0);
break;
case (activateEvt):
j = (int) BitAnd(myEvent.modifiers, activeFlag);
if (j) /* if activate... */
{
WorkRetCode = MenuUpdate(ProcMain); /* set the menus */
}
else /* if deactivate... */
{
}
break;
}
return MainWindRetCode;
}